﻿Imports System.Data.SqlServerCe

Namespace SQLCompactDataAccess

    Public Class DataAccessHelper
        Public Shared Function BuildSQLParameter(ByVal strParameterName As String, ByVal objSqlDbType As System.Data.SqlDbType, ByVal bolNullable As Boolean, ByVal objValue As Object) As SqlCeParameter

            Dim obj As New SqlCeParameter(strParameterName, objSqlDbType)
            obj.IsNullable = bolNullable
            obj.Value = objValue
            Return obj
        End Function

        Public Shared Function BuildSQLParameter(ByVal strParameterName As String, ByVal objSqlDbType As System.Data.SqlDbType, ByVal intSize As Integer, ByVal bolNullable As Boolean) As SqlCeParameter

            Dim obj As New SqlCeParameter(strParameterName, objSqlDbType)
            obj.Size = intSize
            obj.IsNullable = bolNullable
            Return obj
        End Function

        Public Shared Function BuildSQLParameter(ByVal strParameterName As String, ByVal objSqlDbType As System.Data.SqlDbType, ByVal intSize As Integer, ByVal bolNullable As Boolean, ByVal objValue As Object) As SqlCeParameter

            Dim obj As New SqlCeParameter(strParameterName, objSqlDbType)
            obj.Size = intSize
            obj.IsNullable = bolNullable
            obj.Value = objValue
            Return obj
        End Function

        Public Shared Function BuildSQLParameter(ByVal strParameterName As String, ByVal objSqlDbType As System.Data.SqlDbType, ByVal intSize As Integer, ByVal objValue As Object) As SqlCeParameter

            Dim obj As New SqlCeParameter(strParameterName, objSqlDbType)
            obj.Size = intSize
            obj.Value = objValue
            Return obj
        End Function

        Public Shared Function BuildSQLParameter(ByVal strParameterName As String, ByVal objSqlDbType As System.Data.SqlDbType, ByVal objValue As Object) As SqlCeParameter

            Dim obj As New SqlCeParameter(strParameterName, objSqlDbType)
            obj.Value = objValue
            Return obj
        End Function

    End Class

End Namespace
